1. Field of the Invention
The present invention relates to an information processing apparatus, such as a personal computer or a digital camera, including a universal serial bus (USB) port that is commonly used by mobile devices and that serves as an external communication interface and, in particular, to an information processing apparatus serving as a USB device (a USB peripheral).
More particularly, the present invention relates to an information processing apparatus serving as a USB device and being connected to two or more USB hosts in a multiplexed manner and, in particular, to an information processing apparatus being connected to two or more USB hosts in a multiplexed manner through one USB device interface.
2. Description of the Related Art
A universal serial bus (USB) is a general-purpose bus interface that supports a plug-and-play function and that replaces legacy ports, such as a serial port (RS-232C) and a parallel port. Initially, the specification of a USB is developed by four companies including Intel Corporation. Nowadays, USB Implementers Forum, Inc. (USB-IF), which is a non-profit organization (NPO), determines and manages the specification of a USB. In recent years, the USB 2.0 standard that provides a high speed mode in which data are transferred at a speed (max. 480 Mbps) higher than the speed of IEEE 1394 (max. 400 Mbps) has been widely used.
The USB standard defines specification groups called “USB classes” in accordance with the features of peripheral devices. Devices that comply with one of the class specifications provide the same features. Therefore, devices that comply with one of the class specifications can be operated under the control of the same class driver. Consequently, device-specific driver software is not necessary.
In a USB communication system, one of a plurality of devices functions as a “host”, and the others function as “devices”. In addition, one end of a USB cable has an “A plug” to be connected to the host while the other end has a “B plug” to be connected to a device. Thus, a USB cable has an asymmetrical structure. An apparatus connected to the A plug serves as a host, and an apparatus connected to the B plug serves as a device. The device is also referred to as a “function” or a “peripheral”. However, hereinafter, only the term “device” is used.
In a USB communication system, the host performs scheduling. The communication is initiated by the host at all times, and a device responds to the host. That is, the host sends a request to a device, and a device returns a response to the host. Thus, communication is performed. The device sends its own information to the host or exchanges data with the host only when the device responds to a request received from the host. That is, the host performs overall control of data communication in a USB interface so that the host can communicate with a plurality of devices. In contrast, the device performs communication under the control of the host. The communication partner of the device is the host in any case.
The USB standard is widely used and can be found when a hard disk unit, a printer, a scanner, or a modem that serves as a device is connected to a personal computer (PC) that serves as a host. Thus, the USB standard is the de facto standard in the industry. In addition, recently, a mobile device, such as a digital camera or a portable music player, that operates independently has been connected to a PC as a USB device and has been used for a data transmission apparatus or a data reception apparatus of the PC.
For example, Japanese Unexamined Patent Application Publication No. 2002-237971 describes an electronic still camera that exchanges image data with a PC connected thereto via a USB cable and charges a buttery thereof at the same time.
On the other hand, in many cases, a mobile device, such as a digital camera, is connected to a PC via a base station called a “cradle” instead of being directly connected to a connector of a PC. A cradle unit is used for charging a battery of the mobile device. In addition, in many cases, the cradle unit includes a USB port or a serial port so as to provide a port connection function. When being placed on the cradle, the mobile device can synchronize its data with data in a PC or a USB host. Furthermore, peripheral equipment, such as a printer, can be connected to the mobile device via a cradle.
A digital camera may be connected to a USB host when a user holds the digital camera in order to take a picture. In addition, a digital camera may be connected to a USB host when the digital camera is placed on a cradle in order to charge a battery of the digital camera. Accordingly, it is necessary to provide a USB connector to a digital camera and a cradle (refer to, for example, Japanese Unexamined Patent Application Publication No. 2002-232750 (FIG. 3)). However, when a mobile device, such as a digital camera, is placed on a cradle, it is difficult to connect a USB cable to a USB connector of the mobile device. Therefore, the USB cable is removed from the USB connector of the mobile device and is then connected to a USB connector of the cradle.
In the current USB specification, a scheme for multiplexing one USB device interface so that a plurality of USB hosts are connected to the USB device interface is not provided. Suppose that a USB device has two USB connectors. When a USB cable is connected to one of the USB connectors and if another USB cable is connected to the other connector, the USB device may malfunction or may be damaged, since the USB device does not have an arbitrator that determines which USB host the USB device should communicate with. In addition, in such a case, it is difficult for the quality of an electrical signal of the USB device to comply with the quality of an electrical signal defined by the USB specification.
Note that, in order to multiplex a USB interface, a USB hub is available. However, a USB hub is designed so that a plurality of USB devices are connected to only a USB host interface. Thus, a USB hub is not designed so as to be applied to a USB device.
For example, the necessity of multiplexing a USB device interface can be eliminated by providing a USB connector to a cradle without providing a USB connector to a mobile device, such as a digital camera (refer to, for example, Japanese Unexamined Patent Application Publication No. 2006-165851 (FIG. 1)). However, since a mobile device is connected to a USB host only via a cradle, it is necessary for a user to carry a cradle together with the mobile device. This is troublesome for the user. In addition, in order to connect a digital camera to a USB host when the digital camera is operated by a user in addition to when the digital camera is placed on a cradle for charging a battery, it is necessary for the digital camera to have a USB connector. For example, a user may wish to connect a peripheral device having a USB host interface (e.g., a GPS or a microphone) to a digital camera during capturing of an image. In addition, a user may wish to print an image using a printer while operating the digital camera.
If a plurality of USB device interface circuits are implemented in the mobile device, USB connection is achieved between a USB host and each of the mobile device and the cradle. However, since the number of circuit components increases, the manufacturing cost of a mobile device increases. Thus, this solution is not practical.
For example, an information processing apparatus that functions as a USB host is described in Japanese Unexamined Patent Application Publication No. 2004-334823. The information processing apparatus includes internal USB devices connected to a board pattern. The number of the internal USB devices is greater than the number of ports of the USB host. When switching between the internal USB devices, a non-connection period is provided during the switching time. Thus, a USB host controller can recognize a new one of the internal USB devices connected thereto.
As described above, when the information processing apparatus functions as a USB host, the information processing apparatus allows two or more USB devices to be connected thereto. That is, multiplexing a USB host interface can be realized. However, the information processing apparatus does not allow a USB device to be connected to two or more USB hosts. That is, multiplexing a USB device interface is not realized. In addition, this information processing apparatus is designed so that two or more USB devices are connected to the USB host controller via an analog switch that is switched by a control central processing unit (CPU). However, the control CPU is unable to detect a USB device connected to a USB connector in a non-connection mode. A USB device connected to the USB connector in a non-connection mode is also unable to detect the connection.